package tt.love.hw.action;

import tt.love.hw.common.ActionContext;
import tt.love.hw.common.ViewRender;

public class RedirectAction {

	public ViewRender redirect(ActionContext actionContext) {
        //such as request URL = /view.request.tt, will forward to view.request tiles definition
		String requestURL = actionContext.getRequest().getServletPath();
		return new ViewRender(requestURL.substring(requestURL.lastIndexOf("/")+1, requestURL.length() - 3));

	}
}
